<template >
  <div>
    <h1>我是惊喜组件</h1>
    <input type="text"
           v-model="msg">
  </div>
</template>
<script>
export default {
  name: "supries",
  data () {
    return {
      msg: ""
    }
  },
  beforeCreate () {
    console.log("创建前")
  },
  created () {
    console.log("创建后")
  },
  beforeMount () {
    console.log("挂载前")
  },
  mounted () {
    console.log("挂载后")
  },
  beforeUpdate () {

  },
  updated () {

  },
  beforeDestroy () {
    console.log("销毁前")
  },
  destroyed () {
    console.log("销毁后")
  },
  activated () { //组件进入（激活）
    console.log("组件激活")
  },
  deactivated () { //组件离开
    console.log("组件离开")
  },
}
</script>
<style lang="less">
</style>